<template>
	<view class="list-content">
		<z-paging ref="paging" v-model="dataList" @query="queryList" :auto="false" :defaultPageSize="10">
			
			<view v-for="(item,index) in dataList" :key="item.id" class="content">
				<view class="flex align-center justify-center" style="margin-top: 20rpx;">
					<uv-tags class="tags" :text="item.update_time" shape="circle" color="#fff" bgColor="#D6D6D6"
						borderColor="#D6D6D6" />
				</view>
				<view class="item">
					<view class="flex align-center">
						<image src="https://linshitong.oss-cn-shenzhen.aliyuncs.com/dev/image/2025/0816/0cf85202508161154153860.png" mode="widthFix" style="width: 40rpx;" />
						<uv-text :text="item.title" size="30rpx" color="#333333" bold customStyle="margin-left: 10rpx" />
					</view>
					<uv-text :text="item.content" size="28rpx" color="#A5A5A5" customStyle="margin-top: 14rpx" :lines="1"/>
				</view>
			</view>
		</z-paging>
	</view>
</template>

<script setup>
	import {
		ref,
		reactive
	} from 'vue';
	import {
		onLoad
	} from '@dcloudio/uni-app'
	
	import zPaging from '@/uni_modules/z-paging/components/z-paging/z-paging.vue'
	
	import {
		getSystemNotices
	} from '@/api'
	import dayjs from 'dayjs';
	
	const time = dayjs().format('YYYY-MM-DD HH:mm')
	
	const paging = ref(null)
	const dataList = ref([])
	const queryList = (pageNo, pageSize) => {
		
		let param = {
			target: 2,
			page: pageNo,
			limit: pageSize,
		}
		getSystemNotices(param).then(res => {
			    paging.value.complete(res.result.list);
			}).catch(res => {
				paging.value.complete(false);
			})
	}
</script>

<style>
	page {
		background-color: #F6F4F7;
	}
</style>

<style lang="scss" scoped>
	.tools {
		padding: 20rpx 0;
		background-color: #fff;

		.img {
			width: 50%;
			margin: 0 auto;
		}
	}

	.content {
		
		padding: 30rpx;
	}

	.tags {
		display: inline-flex;
	}

	.item {
		padding: 30rpx;
		margin-top: 30rpx;
		border-radius: 10rpx;
		background-color: #fff;
	}
	
	.list-content{
		
	}
</style>